package ${classPath};

<#assign instance="${domain?substring(0,1)?lower_case}${domain?substring(1)}"/>
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;

import javax.validation.constraints.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.annotation.Excel.ColumnType;
import com.ruoyi.common.annotation.Excel.Type;
import com.ruoyi.common.annotation.Excels;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.xss.Xss;

@Data
@ToString
@ApiModel(value = "${classComment}对象编辑")
public class ${domain}EditCommand {

<#list fieldList as field>


<#compress>
  /** ${field.comment} */<#list field.annotations as annotation> <#--内层循环-->
<#if field.name!="id">
  <#if !annotation?starts_with("@Co")&&!annotation?starts_with("@E")>
    ${annotation}
  </#if>
</#if>
</#list>
  @ApiModelProperty(value = "${field.comment}")
  private ${field.type} ${field.name};
</#compress>
</#list>

  public void apply(${domain} ${instance}) {
  <#list fieldList as field>
    if(${field.name} != null)
    {
      ${instance}.set${field.name?cap_first}(${field.name});
    } 
  </#list>
  }
	public void fill(${domain} ${domain}) {
		BeanUtils.copyPropertiesIgnoreNull(this, ${domain});
	}
}
